package com.station.search.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.station.search.constant.DeleteEnum;
import com.station.search.domain.StationUser;
import com.station.search.mapper.StationUserMapper;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

/**
 * @author: JT
 * @date: 2021/9/8
 * @Title:
 */
@Service
public class StationUserServiceImpl extends ServiceImpl<StationUserMapper, StationUser> implements StationUserService {

    @Resource
    private StationUserMapper stationUserMapper;

    @Override
    public IPage<StationUser> listAsPage(Page<StationUser> stationUserPage) {
        StationUser stationUser = new StationUser();
        stationUser.setIsDeleted(DeleteEnum.NOT_DELETED.getValue());
        return stationUserMapper.selectPage(stationUserPage, Wrappers.lambdaQuery(stationUser));
    }
}
